set i=5
set download=10nums20bits.out
set zerosize=0
set j=1

:repeatagain
if %j% EQU %i% (goto :eof)
set /a j=%j%+1
echo %j%
call 1d.autoPlink_n_machines_10nums_57machines.bat
ping 192.0.2.2 -n 1 -w 1000 > null
:mainloop
pscp -pw "Meocon@)13" lemduc@stile01.cloudapp.net:%download% ./
ping 192.0.2.2 -n 1 -w 1000 > null

FOR /F "usebackq" %%C IN ('%download%') DO set size=%%~zC

if %size% NEQ 0 ( goto :writefile )
	echo.File is ^= %zerosize% bytes
	ping 192.0.2.2 -n 1 -w 10000 > null
	goto :mainloop

:writefile
	echo.File is ^> %zerosize% bytes
	copy %download% %j%.out
	call 0.autoPlink_n_kill_java_60.bat
	ping 192.0.2.2 -n 1 -w 10000 > null
	goto :repeatagain

	